<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head th:replace="decorator :: common_header(~{::'title/text()'},~{::customHead})">
	<title >图片上传</title>


	<!--/*/ <th:block th:fragment="customHead" > /*/-->
	<link rel="stylesheet" href="lib/dropzone/dropzone.min.css">

	<link href="lib/switch/bootstrap-switch.css" rel="stylesheet">


	<!--/*/ </th:block > /*/-->

</head>
<body th:replace="decorator :: common_body(~{::mainBody},~{::tailScript})">
<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="mainBody" >  /*/-->
<div class="box box-primary upload " th:with="storageLevel=${'pro'}">
	<div class="box-header with-border">
		<h3 class="box-title" th:text="${boxTitle}">上传</h3>

		<div class="box-tools pull-right">
			<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
			</button>
		</div><!-- /.box-tools -->

	</div><!-- /.box-header -->
	<div class="box-body">
		<div class="row">
			<div class="col-md-8">
				<div class="form-group">
					<label class="control-label" for="directoryField"><i class="fa"></i>上传目录</label>
					<div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default url-prefix" type="button">
	                            <span class="prefix" th:text="${storagePrefix}">http://sinacloud.net/</span><span class="root"
	                                  data-root0="pro"
	                                  data-root1="pri"
	                                  data-root2="pub"
	                                  th:text="${storageLevel}">pro</span>/</button>
                        </span>
						<input type="text" class="form-control" id="directoryField" maxlength="60"
						       placeholder="目录" value="" form="uploadForm">
						<span class="input-group-btn">
                              <button class="btn btn-default lock" type="button" data-on="使用" data-off="取消">使用</button>
							  <button type="button" class="btn btn-default url-List">已上传文件 url 列表</button>
                        </span>
					</div><!-- /input-group -->
					<span class="help-block"></span>
				</div>
			</div>
			<div class="col-md-4"></div>
		</div>
		<form id="uploadForm" th:action="${uploadAction}" class="dropzone text-primary upload" method="post"
		      enctype="multipart/form-data" style="min-height: 300px">
			<input type="hidden" name="content" value="json"/>
			<input type="hidden" name="directory"/>
			<input type="hidden" name="storageLevel" th:value="${storageLevel}">
			<!--<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>-->
		</form>
	</div> <!-- /.box-body -->
</div><!-- /.box -->
<!-- Modal,用于显示上传细节. start -->
<div id="detailModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog modal-lg" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title">结果详情</h4>
			</div>
			<div class="modal-body">
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div><!-- Modal,用于显示上传细节. -->

<!--/*/ </th:block>  /*/-->


<!-- 原型注释  -->
<!--/*/ <th:block th:fragment="tailScript" > /*/-->
<script src="lib/switch/bootstrap-switch.js" defer="defer"></script>

<script src="lib/dropzone/dropzone.min.js" defer="defer"></script>

<script src="js/util/DataUtils.js" defer="defer"></script>
<script src="js/storage/commonDrop.js" defer="defer"></script>
<!--/*/ </th:block>  /*/-->
</body>
</html>